<template>
  <div class="content">
    <div class="header">
      <van-divider />
      <div>来自：{{mail.from_user.nick_name}}</div>
      <van-divider />
      <div>时间：{{mail.time}}</div>
      <van-divider />
    </div>
    <div class="details">
      <p>{{mail.msg}}</p>
    </div>
    <van-divider />
    <div class="footer">
      <van-button type="default" @click="onDelete">删除</van-button>
      <van-button type="default" @click="toReply">回复</van-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "MailDetail",
  data(){
    return {
      mail:{}
    }
  },
  methods:{
    onDelete(){

    },
    toReply(){
      MiniApp.navigateTo({url:"/mailreply.html"})
    }
  },
  beforeMount() {
    this.mail=JSON.parse(MiniApp.getStorageSync({key:"mail"}))
  }
}
</script>

<style scoped>
.content{
  background: white;
}
.details{
  height: 20rem;
}
.footer{
  text-align: center;
}
.footer button{
  margin-right: 20px;
}

</style>